package org.im.service.message.bean;

public enum ActionType {

    // 用户上线
    NEW_USER(1),

    // 用户下线
    USER_LEAVE(2),

    // 发送信息动作
    SEND_MSG(3);

    private int type;

    private ActionType(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public static ActionType valueOf(int type) {
        switch (type) {
            case 1:
                return NEW_USER;
            case 2:
                return USER_LEAVE;
            default:
                return NEW_USER;
        }
    }
}
